﻿namespace KinonekoSoftware.CodariaDB.Objects
{
    /// <summary>
    /// <see cref="FamilyTreeTraversalResult"/> 类型表示遍历结果。
    /// </summary>
    public enum FamilyTreeTraversalResult
    {
        /// <summary>
        /// 祖辈
        /// </summary>
        Ancestor,

        /// <summary>
        /// 配偶
        /// </summary>
        Spouse,

        /// <summary>
        /// 同胞
        /// </summary>
        Sibling,

        /// <summary>
        /// 后裔
        /// </summary>
        Descendant,
    }

    public sealed class FamilyTreeTraversalNode : ObservableObject
    {
        private FamilyTreeTraversalResult _result;
        private string                    _name;

        /// <summary>
        /// 获取或设置 <see cref="Name"/> 属性。
        /// </summary>
        public string Name
        {
            get => _name;
            set => SetValue(ref _name, value);
        }

        /// <summary>
        /// 获取或设置 <see cref="Result"/> 属性。
        /// </summary>
        public FamilyTreeTraversalResult Result
        {
            get => _result;
            set => SetValue(ref _result, value);
        }
    }

    public sealed class FamilyTreeTraversalDictionary
    {
        /// <summary>
        /// 
        /// </summary>
        public List<FamilyTreeTraversalNode> TraversalNodes { get; set; }
        
        
    }
}